﻿﻿<?php
	ob_start();
	@session_start();
	include("inc/common_variables.php");
	$flag_login = false;
	
	
	if(isset($_GET["act"])){
				$a = $_GET["act"];
	}
	if (isset($_POST["act"])){
		if ($_POST["act"] == "logout"){
			$_SESSION[$ssUserID] = '';
		}
	}
	if (isset($_SESSION[$ssUserID])){
		if (!$_SESSION[$ssUserID] == ""){
			$flag_login = true;
		}else{
			$a = "index";
		}
	}else{
		$a = "index";
	}

	$path = "page/index.php";

	switch($a){
		case "add_logo":
			$path = "page/add_logo.php";
			break;
		case "banner":
			$path = "page/banner.php";
			break;
		case "header":
			$path = "page/header.php";
			break;
		case "add_content":
			$path = "page/add_content.php";
			break;
		case "edit_content":
			$path = "page/edit_content.php";
			break;
		case "edit_event":
			$path = "page/edit_event.php";
			break;
		case "onpress":
			$path = "page/onpress.php";
			break;
		case "gallery":
			$path = "page/gallery.php";
			break;
		case "home":
			$path = "page/home.php";
			break;
		case "content_home":
			$path = "page/content_home.php";
			break;
		case "logo_home":
			$path = "page/logo_home.php";
			break;
		case "menu":
			$path = "page/menu.php";
			break;
		case "logo_menu":
			$path = "page/logo_menu.php";
			break;
		case "content_menu":
			$path = "page/content_menu.php";
			break;
		case "image_menu":
			$path = "page/image_menu.php";
			break;
		case "collection":
			$menu_ho = "menu_item_unselected";
			$menu_collection = "menu_item_selected";
			$path = "page/collection.php";
			break;
		case "image_collection": 
			$path = "page/image_collection.php";
			break;
		case "content_collection":
			$path = "page/content_collection.php";
			break;
		case "promotion":
			$path = "page/promotion.php";
			break;
		case "content_promotion":
			$path = "page/content_promotion.php";
		break;
		case "logo_promotion":
			$path = "page/logo_promotion.php";
		break;
		case "event":
			$path = "page/event.php";
			break;
		case "add_event":
			$path = "page/add_event.php";
			break;
		case "image_event":
			$path = "page/image_event.php";
			break;
		case "contact":
			$path = "page/contact.php";
			break;
		case "content_contact":
			$path = "page/content_contact.php";
			break;
		case "logo_contact":
			$path = "page/logo_contact.php";
			break;
		case "login":
			$path = "page/index.php";
			break;
		case "logout":
			$path = "page/logout.php";
			break;
		case "info":
			$path ="page/info.php";
			break;
		case "change_pass":
			$path ="page/change_password.php";
			break;
		case "change_email":
			$path ="page/change_email.php";
			break;
	}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<title>Content Management System</title>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link href="../images/wh.ico"	rel="shortcut icon" />
	
	<link rel="stylesheet" href="../css/ext-all.css" type="text/css" />
	<link rel="stylesheet" href="../css/menu_style.css" type="text/css" />
	<link rel="stylesheet" type="text/css" href="../css/ui/jquery.ui.all.css" />
	<link rel="stylesheet" href="../css/ui/jquery.ui.datepicker.css" type="text/css" />
	<link rel="stylesheet" href="../js/uploadify/uploadify.css" type="text/css" />

	<script type="text/javascript" src="../js/adapter/ext/ext-base.js"></script>
	<script type="text/javascript" src="../js/ext-all.js"></script>
	<script type="text/javascript" src="../js/jquery.js"></script>	
	<script type="text/javascript" src="../js/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
	<script type="text/javascript" src="../js/uploadify/swfobject.js"></script>
	<script type="text/javascript" src="../js/ui/jquery.ui.core.js"></script>
	<script type="text/javascript" src="../js/ui/jquery.ui.datepicker.js"></script>
	<script type="text/javascript" src="../js/ui/jquery.ui.widget.js"></script>
	<script type="text/javascript" src="../js/common.js"></script>
	
</head>
<body>
<?php
	include("inc/header.inc.php");
	
?>
<div id="sub_content">
<div id="fakesize">
<div id="menu_container" class="menu" >
		<ul>
			<li style='width:180px'><a href="?act=index">BACKGROUND</a>
				<ul class= "subnav">
					<li><a 
                href="?act=banner">Banner</a></li>
					<li><a href="?act=header">Header</a></li>
					<li><a href="?act=add_content">Add&nbsp;Content</a></li>
					<li><a href="?act=add_logo">Add&nbsp;Logo</a></li>
				</ul>
			</li>

			<li style='width:80px'><a href="?act=home">HOME</a>
				<ul class= "subnav">
					<li><a href="?act=gallery">Gallery</a></li>
					<li><a href="?act=content_home">About&nbsp;Us</a></li>
                	<li><a href="?act=logo_home">Logo</a></li>
                	<li><a href="?act=onpress">Onpress</a></li>
			   </ul>
		  	</li>
			<li style='width:80px'><a href="?act=menu">MENU</a>
  				<ul class= "subnav">
	                <li><a href="?act=logo_menu">Logo&nbsp;Menu</a></li>
	                <li><a href="?act=content_menu">Content&nbsp;Menu</a></li>
	                <li><a href="?act=image_menu">Image&nbsp;Menu</a></li>
                </ul>               
          	</li>
          	<li style='width:180px'><a href="?act=collection">COLLECTIONS</a>
                <ul class= "subnav">
	                <li><a href="?act=image_collection">Image&nbsp;Collection</a></li>
	                <li><a href="?act=content_collection">Content&nbsp;Collection</a></li>
                </ul>
          	</li>
          	<li style='width:160px' ><a href="?act=promotion">PROMOTION</a>
               	<ul class= "subnav">
                	<li><a href="?act=logo_promotion">Logo&nbsp;Promotion</a></li>
             		<li><a href="?act=content_promotion">Content&nbsp;Promotion</a></li>
                </ul>
		  	</li>
		  	<li style='width:80px'><a href="?act=event">EVENT</a>
                <ul class= "subnav">
                   	<li><a href="?act=add_event">Add&nbsp;Event</a></li>
	                <li><a href="?act=image_event">Image&nbsp;Event</a></li>
                </ul>
          	</li>
          	<li style='width:120px'><a href="?act=contact">CONTACT</a>
                <ul class= "subnav">
                	<li><a href="?act=logo_contact">Logo&nbsp;Contact</a></li>
             		<li><a href="?act=content_contact">Content&nbsp;Contact</a></li>
                </ul>
          	</li>
			<?php if($flag_login ==true){?>
			<li style='width:120px'><a href="?act=info">INFO</a>
                <ul class= "subnav">
                	<li><a href="?act=change_email">Change&nbsp;Email</a></li>
					<li><a href="?act=change_pass">Change&nbsp;Password</a></li>
					<li><a href="?act=logout">Logout</a></li>
                </ul>
			</li>
			<?php }else{?>
				 <li style='width:120px' ><a href="?act=login">LOGIN</a>
			<?php }?>
		</ul>
</div>
</div>

	<div id="content"> 
        <?php include($path); ?>
       	<br style="clear:both" />
    </div>
</div>
</body>
</html>

